package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    /**
     * 按openid选择
     *
     * @param openid openid
     * @return {@link User}
     */
    @Select("select id, openid, name, phone, sex, id_number, avatar, create_time from user where openid=#{openid}")
    User selectByOpenid(String openid);

    /**
     * 插入
     *
     * @param user 用户
     */
    void insert(User user);
}
